package chapter005;

import org.junit.Test;

/**
 * 控制语句
 *
 * @author Jack魏
 */
public class Point06 {

    @Test
    public void continueTest(){
        int n = 10;

        for (int i=0; i<n; i++){
            System.out.println("continue之前语句 --" + i);
            continue;
            //  System.out.println("continue之后语句");
        }
        System.out.println("continueTest 方法结束");
    }

    @Test
    public void breakTest(){
        int n = 10;

        for (int i=0; i<n; i++){
            System.out.println("break之前语句 --" + i);
            break;
            // System.out.println("break之后语句");
        }
        System.out.println("breakTest 方法结束");
    }

    @Test
    public void returnTest(){
        int n = 10;

        for (int i=0; i<n; i++){
            System.out.println("return之前语句 --" + i);
            return;
            // System.out.println("break之后语句");
        }
        System.out.println("returnTest 方法结束");
    }
}
